{extend name='admin@public/content'}

{block name="content"}

<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" id="myform" action="{:request()->url()}" onsubmit="return false" method="get">

    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">会员号</label>
        <div class="layui-input-inline">
            <input name="code" id="code" value="{$Think.get.code|default=''}" placeholder="请输入会员号" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">卡号</label>
        <div class="layui-input-inline">
            <input name="card_no" id="card_no" value="{$Think.get.card_no|default=''}" placeholder="请输入订单编号" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>

    <input type="hidden" name="excel"  value='0' >

    <div class="layui-form-item layui-inline">
        <a class="layui-btn layui-btn-primary" style="background: gold;" id="export">导出表格</a>
    </div>

</form>

<!--{empty name='list'}-->
<p class="help-block text-center well">没 有 记 录 哦！</p>
<!--{else}-->
<input type="hidden" value="resort" name="action">
<table class="layui-table" lay-skin="line">
    <thead>
    <tr>
        <th class='text-left nowrap'>会员号</th>
        <th class='text-left nowrap'>会员昵称</th>
        <th class='text-left nowrap'>会员余额</th>
        <th class='text-left nowrap'>注册时间</th>
        <th class='text-left nowrap'>会员卡号</th>
        <th class='text-left nowrap'>启用</th>
        <th></th>
    </tr>
    </thead>
    <tbody>
    <!--{foreach $list as $key=>$vo}-->
    <tr>
        <td class="text-left nowrap">
            {$vo.code}
        </td>
        <td class='text-left nowrap'>
            {$vo.user_name}
        </td>
        <td class='text-left nowrap'>
                {$vo.amount|fenToyuan}
        </td>
        <td class='text-left nowrap'>
            {$vo.create_at}
        </td>
        <td class='text-left nowrap'>
            {$vo.cards}
        </td>
        <td class='text-left nowrap'>
            {if $vo.disable == 0}否{/if}
            {if $vo.disable == 1}是{/if}
        </td>
       
        <td class='text-left nowrap'>
            {if auth("$classuri/setdisable")}
                {if $vo.disable == 1}
                    <span class="text-explode">|</span>
                    <a data-title="" data-modal='{:url("$classuri/setdisable")}?id={$vo.id}&val=0'>禁用</a>
                {else}
                <span class="text-explode">|</span>
                <a data-title="" data-modal='{:url("$classuri/setdisable")}?id={$vo.id}&val=1'>启用</a>
                {/if}
            {/if}

            {if auth("$classuri/chongzhi")}
                <span class="text-explode">|</span>
                <a data-title="手动充值" data-modal='{:url("$classuri/chongzhi")}?id={$vo.id}'>手动充值</a>
            {/if}
        </td>
    </tr>
    <!--{/foreach}-->
    </tbody>
</table>
{if isset($page)}<p>{$page|raw}</p>{/if}
<!--{/empty}-->

<script type="text/javascript">
    $(function () {
    //    status = '{$Think.get.pay_status}';
    //    if(status !=='0' && status !=='1' && status !=='2'){
    //        $("#all").attr("selected",true);
    //    };

       
       $("#export").click(function () {
           $("#excel").val("1");
           $("#myform").submit();
       });


    });

</script>

{/block}